
const React =qguan('react');
const syText={
    width: '100%',
    height:'33%',
    padding:'0px',
    margin:'0px',
    border:'0px',
    'fontSize': '18px',
    'borderStyle': 'solid',
    'borderWidth': '1px',
}

export default class ShoppingList extends React.Component {
    constructor(props) {
        super(props)
        //状态值
        this.state = {
            inputValue:'',
            textareaValue:''
        }

    }
    /**
     * 初始化数据
     */
/*    componentDidMount = () => {

        let _this=this;

     /!*   //输出  接受
        window.ipcRenderer.on('outMes', (event, arg) => {
            _this.outMes(arg)
        });
*!/
    }*/
  /*  componentWillUnmount = () => {
       // window.ipcRenderer.removeListener('outMes' );
    }*/


    //输入 发送
    inMes(outType,mes) {
      //  ipcRenderer.send('inMes',{outTyep:outType,mes:mes})
    }
    outMes(arg){
            switch(arg.outTyep){
                case 'new': //新建文件
                    break;

                case 'exiting':
                    break;
         }
    }
    onKeyup(e) {
        if(e.keyCode === 13) {
            console .log("输入A 回车")
            this.inMes('A',"输入A 回车.....")
        }
    }

    onKeyupb(e) {
        if(e.keyCode === 13) {
            console .log("输入B 回车.....")
            this.inMes('B',"输入B 回车.....")
        }
    }
    handleTextareaChange(e){
        this.setState({
            textareaValue:e.target.value
        })
    }
    render() {
        return (
            <div className="shopping-list">
                输入A<textarea id="txtEditor8"    style ={syText}    onKeyUp={this.onKeyup} ></textarea>
                输入B<textarea id="txtEditor9"    style ={syText}  onKeyUp={this.onKeyupb}></textarea>
                输出
                <div>
                </div>
            </div>
        );
    }
}






